﻿<%@ Page Title="" Language="C#" MasterPageFile="~/article/MasterPage.master" AutoEventWireup="true" CodeFile="account.aspx.cs" Inherits="User_account" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
    .headimg
    {
    	padding:5px 5px 5px 5px;
    	background-color:#E9F1F8;
    	width:160px;
    	height:190px;
    	float:left;
    }
    .headimg img
    {
    	margin:5px;
    	background-color:White;
    }
    .userinfo
    {
    	float:right;
    	height:190px;
    	width:500px;
    }
    .userinfo tr
    {
    	height:30px;
    	font-size:10pt;
    }
    .bluebutton
    {
	    background-image:url(../skin/images/bluebtn.png);
	    background-repeat:no-repeat;
	    cursor:hand;
	    width:70px;
	    height:25px;
    }
    .titleinput
    {
	    border-style:inset;
	    border-width:1px;
	    width:140px;
    }
    .progress
    {
    	text-align:center;
    	height:30px;
    }
    #blackpanel
    {
    	filter:alpha(Opacity=80);-moz-opacity:0.5;opacity: 0.5;
    	background-color:Black;
    	position:fixed;
    	top:0px;
    	left:0px;
    	display:none;
    	z-index:99998;
    }
    #closepanel
    {
    	width:40px;
    	height:40px;
    	position:fixed;
    	right:0px;
    	top:0px;
    	z-index:99999;
    }
    #uploaddiv
    {
    	width:240px;
    	height:160px;
    	position:fixed;
    	background-color:Gray;
    	text-align:center;
    }
    .ctl00_ArticleTitle_UserMenu_2 td
    {
    	text-align:center;
    }
</style>
<link href="../skin/uploadify.css" rel="Stylesheet" />
<script type="text/javascript" language="javascript" src="../js/WdatePicker.js">
</script>
<script type="text/javascript" language="javascript" src="../js/JScript.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ArticleTitle" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="menupanel" runat="server">
        <ContentTemplate>
    <asp:Menu ID="UserMenu" runat="server" Orientation="Horizontal" 
                onmenuitemclick="UserMenu_MenuItemClick" BackColor="#E3EAEB" 
                DynamicHorizontalOffset="2" Font-Bold="True" Font-Names="黑体" Font-Size="Large" 
                ForeColor="#666666" Height="40px" StaticSubMenuIndent="10px" Width="700px">
        <DynamicHoverStyle BackColor="#666666" ForeColor="White" />
        <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
        <DynamicMenuStyle BackColor="#E3EAEB" />
        <DynamicSelectedStyle BackColor="#1C5E55" />
        <Items>
            <asp:MenuItem Text="信息概览" Value="0"></asp:MenuItem>
            <asp:MenuItem Text="详细信息" Value="1"></asp:MenuItem>
            <asp:MenuItem Text="修改头像" Value="2"></asp:MenuItem>
            <asp:MenuItem Text="修改资料" Value="3"></asp:MenuItem>
        </Items>
        <StaticHoverStyle BackColor="#666666" ForeColor="White" />
        <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
        <StaticSelectedStyle BackColor="#1C5E55" />
    </asp:Menu>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ArticleContent" Runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
            <asp:MultiView ID="multiView" runat="server" ActiveViewIndex="0" 
                EnableTheming="False">
                <asp:View runat="server">
                <div class="block">
                    <div class="blockBar"><%=user.UserName %>-基本信息</div>
                        <div class="blockList" style="height:200px">
                        <div class="headimg">
                            <img src='../upload/heads/<%=user.Headimage %>' alt='<%=user.NickName %>' width="150" height="180" />
                            
                        </div>
                        <div class="userinfo">
                            <table style="width:100%">
                                <tr>
                                    <td style="width:40%">用户ID</td>
                                    <td><%=user.UserID %></td>
                                </tr>
                                <tr>
                                    <td>用户名：</td>
                                    <td><%=user.UserName %></td>
                                </tr>
                                <tr>
                                    <td>昵称：</td>
                                    <td><%=user.NickName %></td>
                                </tr>
                                <tr>
                                    <td>Email:</td>
                                    <td><%=user.Email %></td>
                                </tr>
                                <tr>
                                    <td>性别：</td>
                                    <td><%=user.Sex.ToString() %></td>
                                </tr>
                                <tr>
                                    <td>最近登录</td>
                                    <td><%=user.LastLogin.ToString() %></td>
                                </tr>
                            </table>
                        </div>
                        </div>
                </div>
                </asp:View>
                <asp:View runat="server">
                    <div class="block">
                    <div class="blockBar"><%=user.UserName %>-详细信息</div>
                        <div class="blockList">
                            <table style="width:100%">
                                <tr>
                                    <td style="width:40%">用户ID：</td>
                                    <td><%=user.UserID %></td>
                                </tr>
                                <tr>
                                    <td>用户名：</td>
                                    <td><%=user.UserName %></td>
                                </tr>
                                <tr>
                                    <td>用户昵称：</td>
                                    <td><%=user.NickName %></td>
                                </tr>
                                <tr>
                                    <td>Email:</td>
                                    <td><%=user.Email %></td>
                                </tr>
                                <tr>
                                    <td>个人简介：</td>
                                    <td><%=user.Info %></td>
                                </tr>
                                <tr>
                                    <td>生日：</td>
                                    <td><%=user.Birth %></td>
                                </tr>
                                <tr>
                                    <td>性别：</td>
                                    <td><%=user.Sex.ToString() %></td>
                                </tr>
                                <tr>
                                    <td>注册时间：</td>
                                    <td><%=user.CreateDate %></td>
                                </tr>
                                <tr>
                                    <td>用户积分：</td>
                                    <td><%=user.UserScore %></td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </asp:View>
                <asp:View runat="server">
                    <div class="block">
                    <div class="blockBar"><%=user.UserName %>-修改头像</div>
                        <div class="blockList" style="height:200px">
                            <div class="headimg">
                            <img src="../upload/heads/<%=user.Headimage %>" alt="<%=user.NickName %>" width="150" height="180" />
                            </div>
                            <div class="userinfo" style="text-align:center">
                                <asp:Button ID="showupbtn" runat="server" Text="上传" BorderStyle="None"
                                  OnClientClick="ShowUpdate()"
                                  CssClass="bluebutton" /><br />
                                <asp:Literal ID="lblMessage" runat="server"></asp:Literal>
                            </div>
                        </div>
                    </div>
                </asp:View>
                <asp:View runat="server" EnableTheming="False">
                    <div class="block">
                    <div class="blockBar"><%=user.UserName %>-修改资料</div>
                        <div class="blockList">
                            <table style="width:100%">
                                <tr>
                                    <td style="width:30%">用户昵称：</td>
                                    <td>
                                        <asp:TextBox ID="nickNameBox" runat="server"></asp:TextBox></td>
                                </tr>
                                <tr>
                                    <td>性别：</td>
                                    <td>
                                        <asp:DropDownList ID="DropDownList1" runat="server">
                                            <asp:ListItem>男</asp:ListItem>
                                            <asp:ListItem>女</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>电话号码：</td>
                                    <td>
                                        <asp:TextBox ID="phoneBox" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>生日：</td>
                                    <td>
                                        <asp:TextBox ID="birthBox" runat="server" onclick="WdatePicker({lang:'auto'})"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        个人简介：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="infoBox" runat="server" Height="50px" TextMode="MultiLine" 
                                            Width="360px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>
                                        <asp:Button ID="Savebtn" runat="server" Text="保存修改" BorderStyle="None" 
                                            CssClass="bluebutton" onclick="Savebtn_Click" /></td>
                                </tr>
                                <tr>
                                    <td>修改密码：</td>
                                    <td>输入旧密码：<asp:TextBox ID="oldpwdBox" runat="server" TextMode="Password"></asp:TextBox>
                                        <font style="color:Red"><asp:Literal ID="oldlit" runat="server"></asp:Literal></font>
                                    </td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>输入新密码：<asp:TextBox ID="newpwdBox" runat="server" TextMode="Password"></asp:TextBox>
                                        
                                            <font style="color:Red"><asp:Literal
                                        ID="newlit" runat="server"></asp:Literal></font></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td>
                                        <asp:Button ID="changepwdbtn" runat="server" Text="修改密码" BorderStyle="None" 
                                            CssClass="bluebutton" onclick="changepwdbtn_Click" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </asp:View>
            </asp:MultiView>
    </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="Savebtn" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="rightsidebar" Runat="Server">
    <div id="blackpanel">
    <div id="closepanel" onclick="Closepanel()"><img src="../skin/images/close40.png" onclick="Closepanel()" /></div>
<div id="uploaddiv"><br /><br /><br />
    <p><asp:FileUpload ID="FileUpLoad1" runat="server" /></p><br /><br />
    <p>
        <asp:Button ID="Uploadbtn" runat="server" Text="确认上传" BorderStyle="None" 
            CssClass="bluebutton" onclick="Uploadbtn_Click" OnClientClick="checkType()" /></p>
            
</div></div>
    
</asp:Content>

